package org.huntaway.kindergarten.service.daily;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.huntaway.kindergarten.manager.DutyMng;
import org.huntaway.kindergarten.manager.PersonMng;
import org.huntaway.kindergarten.po.Person;
import org.huntaway.kindergarten.service.KindProcessor;
import org.huntaway.kindergarten.util.EnumUse;
import org.huntaway.kindergarten.util.GlobalCon;

public class PersonService extends KindProcessor<Person> {
	public PersonService() {
		super();
		baseMng = (PersonMng) sm.getMng(GlobalCon.PERSON);
	}
	@Override
	public Person getObj() {
		return new Person();
	}
	public ActionForward addBegin(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		ActionForward serBean = super.addBegin(mapping, form, request, response);
		request.setAttribute("resLst", ((DutyMng)sm.getMng(GlobalCon.DUTY)).getDuty());
		return serBean;
	}
	public ActionForward addProcess(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		ActionForward serBean = super.addProcess(mapping, form, request,
				response);
		return serBean;
	}
}
